package com.shangguosha.core.event;



/**
 * 基础游戏事件实现
 */
public class BasicGameEvent extends GameEvent {
    private final Object data;
    
    public BasicGameEvent(String eventType, Object source) {
        this(eventType, source, null);
    }
    
    public BasicGameEvent(String eventType, Object source, Object data) {
        super(eventType, source);
        this.data = data;
    }
    
    public Object getData() {
        return data;
    }
    
    @Override
    public String toString() {
        return String.format("BasicGameEvent{type='%s', source=%s, data=%s}", 
                getEventType(), getSource(), data);
    }
}